// 头部组件

// 卡片组件
window.VueComponents.CardCom = {
  data: () => ({}),
  template: ` <div class="card-container">
              <div class="card-box">
              <!-- 具名插槽 -->
                <slot name="left" ></slot>
                <slot name="right" ></slot>
              </div>
            </div>`,
  created() {
    // 添加组件的样式
    addCssByLink("./component/Card.css");
  },
  method: {
    initData() {},
  },
};

// 头部组件
window.VueComponents.CardHead = {
  props: {
    src: {
      type: String,
      default: "./assets/movie.png",
    },
  },
  data: () => ({}),
  template: `<div class="card-head">
              <h2 class="card-title">
                <img :src="src" class="icon" />
                <span>
                <!-- 默认插槽 -->
                <slot>标题</slot>
                </span>
              </h2>
              <slot name="more"></slot>
            </div>`,

  method: {},

  created() {
    // 添加组件的样式
    addCssByLink("./component/CardHead.css");
  },
};
